import { ArgumentMetadata, Injectable, PipeTransform } from "@nestjs/common";
import { CreateUserDto } from "../dto";

@Injectable()
export class CreateUserPipe implements PipeTransform {
  transform(value: CreateUserDto, metadata: ArgumentMetadata) {
    console.log(
      "%c🚀 自定义管道 已执行！%c 调试",
      "background: linear-gradient(135deg, #ff00cc, #3333ff); color: white; font-weight: bold; padding: 5px 15px; border-radius: 3px 0 0 3px;",
      "background: #e0e0e0; color: #333; padding: 5px 10px; border-radius: 0 3px 3px 0;",
    );
    return value;
  }
}
